<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="layout.html" />
  <xi:include href="macros.html" />
  <xi:include href="testmanagement.html" />

  <head>
    <py:choose>
      <py:when test="project.node_id"><title>Edit Test Project #$project.node_id</title></py:when>
      <py:otherwise><title>New Test Project</title></py:otherwise>
    </py:choose>
  </head>

  <body>
    <div id="content" class="project" py:with="preview_mode = 'preview' in req.args">
      <div class="trac-topnav" py:if="preview_mode">
        <a href="#edit" title="Go to the project editor">Modify</a> &darr;
      </div>

      <py:choose>
        <py:when test="project.node_id"><h1>Edit Test Project #$project.node_id</h1></py:when>
        <py:otherwise><h1>New Test Project</h1></py:otherwise>
      </py:choose>

      <py:if test="preview_mode or project.node_id">
        ${show_project(project, [], True)}
      </py:if>

      <form id="edit" method="POST">
        <input type="hidden" name="action" value="edit" />
        <!-- Properties -->
        <py:if test="'TEST_EDIT' in perm">
          ${show_project_form(project, [])}
        </py:if>
        <div class="buttons">
          <input type="submit" name="preview" value="Preview" />
          <input type="submit" name="submit" value="${project.node and 'Submit changes' or 'Create project'}" />
        </div>
      </form>

    </div>
  </body>
</html>
